The technology described herein relates to video processing systems, and in particular to video encoding systems.
In video encoding, video data (e.g. pixel data representing YUV or RGB values for a sequence of video frames) is encoded into an encoded bitstream according to a video encoding format. Typically, a lossy compression scheme is utilised and the degree to which video data is compressed is controllable by specifying values (and settings) for a set of video encoding parameters. Normally, specifying parameter values for a higher degree of compression will lead to smaller file size but a greater loss of image quality, while specifying parameter values for a lower degree of compression will lead to larger file size but better image quality.
FIG. 1 illustrates a typical video encoding system. An application 2 executing on a host processor 1 will request video encoding operations to be performed on video data by an associated video processor (video processing unit (VPU)) 3. To do this, a driver 4 for the video processor 3 that is running on the host processor 1 will provide to the video processor 3 the video data that is to be encoded, as well as instructions to perform the requested video encoding operations on the video data.
FIG. 2 illustrates an arrangement whereby video data and encoding instructions are provided by the host processor 1 to the video processor 3 using a message queue 6. Video data to be encoded is indicated to the video processor 3 by the host processor 1 sending one or more frame messages 20 to the video processor 3 via the message queue 6.
Encoding instructions are provided to the video processor 3 by the host processor 1 sending the encoding instructions to the video processor 3 via the message queue 6 in the form of one or more configuration messages 21. Each configuration message includes configuration data that specifies how the video processor 3 is to (including the encoding parameter values to use to) encode the video data associated with the frame message or frame messages that follow the configuration message in the message queue 6.
A configuration message applies to the following frame message and each subsequent frame message in the message queue 6 until a new configuration message is encountered in the queue 6. Thus, in the example of FIG. 2, the configuration data in configuration message A applies to the video data associated with frame message 0 and frame message 1, while the configuration data in configuration message B applies to the video data associated with frame message 2.
The configurability of video encoding can be increased by defining plural regions of interest (“ROIs”) (sub-regions) within a video frame or sequence of video frames to be encoded, and encoding each region of interest according to an associated set of encoding parameter values (and settings). This means, for example, that regions of a video frame that are of particular visual importance, e.g. faces, can be encoded using a lower degree of compression to preserve a higher image quality, while regions where lower image quality is acceptable, e.g. backgrounds, can be encoded using a higher degree of compression.
This is done by the application 2 defining the plural regions of interest and requesting video encoding operations to be performed by the video processor 3 for the plural regions of interest. Driver 4 will send instructions to the video processor 3 that specify the regions of interest, as well as the encoding operations to be performed for a frame (or frames) and each region of interest therein.
FIG. 3 shows a configuration message 31 that can be used to send such region of interest encoding instructions to the video processor 3 via the message queue 6 of FIG. 2. As shown in FIG. 3, the configuration message includes configuration data 32 that defines encoding parameter values (and settings) associated with a frame as a whole (e.g. a “Frame Parameter Record” (FPR)), as well as, for each region of interest in the frame, configuration data 33 that defines the respective region of interest and its associated encoding parameter values (and settings) (e.g. a “Block Parameter Record” (BPR)).
The Applicants believe that there remains scope for improvements to video processing systems.
Like reference numerals are used for like components where appropriate in the drawings.